package com.zoe.app;

import cn.hutool.core.collection.CollUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

/**
 * @author zoe.Zhang
 * @date 2022/06/11
 * @description
 */
@RestController
public class OOMController {


    @GetMapping("/oom")
    public void oom() {
        ArrayList<Object> objects = CollUtil.newArrayList();
        for (; ; ) {
            objects.add(new Object());
        }
    }

    @GetMapping("/of")
    public int stackOF() {
        stackOF();
        return 0;
    }

}
